home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Software Vault: The Diamond Collection
/
The Diamond Collection (Software Vault)(Digital Impact).ISO
/
cdr23
/
csmac13a.zip
/
CS-COMMO.CSM
< prev
next >
Wrap
Text File
|
1995-01-22
|
61KB
|
1,346 lines
┌────────────────────────────────┐
│ Chuck Seyboldt's COMMO Macro │ CS-MAC13A:CS-COMMO.CSM
└────────────────────────────────┘ Copyright (c) 1995
All rights reserved
README.1ST contains quick start instructions.
! You need to review this file -AND- COMMO.FON.
! Review the _very_ end of this file, CS-COMMO.CSM, for key assignments.
┌─────────────────┐
│ Startup Macro │ In COMMO.SET, mac=start Startup macro label
└─────────────────┘
{:start}{unlo}
{setv ver,13} ;Version level set here
{ifex %_hom%cs-mac??.cfg,,1new_user} ;If no .CFG exists, make one
{ifex %_hom%cs-mac%ver%.cfg,,1upgrade} ;If old .CFG exists, upgrade
{rope %_hom%cs-mac%ver%.cfg,alcc} ;open .CFG file
{disp ,3,,Reading Config ... }
{:init_loop}
{read line} ;read CS-MACxx.CFG
{inst line,*} {ifco init_loop} ;skip comments in .cfg
{comp line} {ifco init_loop} ;skip blank lines in .cfg
{inst line,,} {ifco ,init_loop} ;comma reqd in active .cfg line
{setv pos,%_pos} {decr pos}
{subs var,1,%pos,%line} ;all before comma is var_name
{inst line, } {ifco ,no_coment} ;two consecutive spaces separate
{setv pos,%_pos} {decr pos} ; variable def'n from comment
{subs line,1,%pos,%line} ;%line now has var'ble & value
{:no_coment}
{inst line,,} {setv pos,%_pos};position of comma
{leng %line} {setv len,%_len};length of var_name+value
{decr len,%pos} {incr pos}
{subs value,%pos,%len,%line}
{setv %%var,%value} ;setv according to .cfg
{comp shh,y} {ifco init_loop}
{disp ,18,,%var ^m}
{goto init_loop} ;loop until .cfg all read
{:alcc} {disp ,3,,Reading CS-MAC%ver.CFG completed.^m^j^j}
{comp hold_dr} {ifco alccc}
{ifex-c %hold_dr\NUL,,no_hold};check for validity of %hold_dr
{:alccc}{comp debug,y} {ifco retu}
{setv _intp,ZGYOCAN} ;standard built-in protocols
{setv _for1,OCA} ;uploads forced to single file
{setv ss_r,|} ;frequently used sslook
{setv-e _uselog,DSZLOG} ;DSZlog info > COMMO.LOG
{setv ring,0} ;ring counter for CS-PILOT
{setv ring_t} ;time of last RING event
{setv set} ;status of CS-PILOT mini-host
{setv ul_dir,%uldir} ;save %uldir
{setv ap_ans2,%ap_ans} ;save Autopilot host ans string
{setv qwk,qwk} {setv rep,rep};default mail extensions
{ifex %savedir\ring.log,,alc1};if RING.LOG exists, instruct
{comp xpert,y} {ifco alc1} ; unless xpert=y
{info-d10s0 To make RING.LOG always active, ^(aut=r_log,%%dialir^) in COMMO.SET}
{:alc1} {capm f} ;reset capture to 'filter' mode
{comp new,y} {ifco 2new_user};New user taken to FON config question
{comp auto,y} {ifco do_ap} ;Is autopilot enabled?
{comp _edd,y} {ifco fon_star} ;Is enter dialer on?
;END of startup macro
{:unlo} {unlo} ;Handy labelname
{:retu} {retu} ;Very handy labelname
{:stop} {stop} ;Very handy labelname
{:1upgrade} ;if old .cfg is found rename to
{goto upgrade,cs-mac.csm} ; current version level
{:1new_user} ;if *NO* .cfg is found make one
{setv new,y} ;autoload macro menu; new user
{goto new_user,cs-mac.csm}
{:2new_user}
{setv new} ;Clear new-user flag
{info-qs0 OK! Now, would you like to modify your FON for automatic mailruns?}
{ifco ,alc1} {goto new_bbsid,cs-mac.csm}
{:alar} {alar %pr_alarm}
{ifer 1,ala_bee} ;error level from internal proto
{ifex %_hom%csmerr.fil,ala_bee};error from BAT file protocol
{retu}
{:ala_bee} {beep} {retu}
{:fb_mac} {setv fb_mac,COMMO.MAC} {retu}
┌────────────────────────────────────────┐
│ Dynamic generating of Protocol menus │
└────────────────────────────────────────┘
{:prot_menu}
{setv menu_pos,1}
{setv lett,ZGYOCANBDEFHIJKLMPQRSTUVWX!};protocol letters in order
{:pmenu_loop}
{subs char,%menu_pos,1,%lett}
{comp char,n} {ifco menun} ;change menu loop
{comp eprot_%char} ;user defined = NUL?
{ifco-c menu%char,usr_menu}
{setv _menu%menu_pos, %char ■ %prot_desc}
{incr menu_pos} {goto pmenu_loop}
{:usr_menu}{setv-s prot_desc,eprot_%char} {retu}
{:menuZ} {setv prot_desc,Zmodem} {retu}
{:menuG} {setv prot_desc,Ymodem/G} {retu}
{:menuY} {setv prot_desc,Ymodem} {retu}
{:menuO} {setv prot_desc,1k-Xmodem} {retu}
{:menuC} {setv prot_desc,Xmodem CRC} {retu}
{:menuA} {setv prot_desc,ASCII} {retu}
{:menuN} {setv count,%menu_pos}
{setv prot_des}
{decr menu_pos}
{comp l_parm} {ifco lmenu_loop}
{incr menu_pos,2}
{setv _menu%menu_pos, N ■ NUL Modem}
{:lmenu_loop}
{incr count}
{subs char,%count,1,%lett}
{comp char,!} {ifco end_menu}
{comp eprot_%char} ;user defined = NUL?
{ifco lmenu_loop}
{:menu_?}{incr menu_pos}
{setv-s temp,eprot_%char}
{setv _menu%menu_pos, %char ■ %temp}
{comp menu_pos,20}
{ifco retu,lmenu_loop}
{:end_menu} {setv lett} {setv char} {retu}
{:msn_prot}
{setv lett,ABCDEFGHIJKLM OPQRSTUVWXYZ}
{subs _prot,%_msn,1,%lett} {setv lett} {retu}
┌────────────────────────┐
│ Upload protocol menu │
└────────────────────────┘
{:mpu}
{:ppu}
{:u_prot}{call prot_menu}
{incr menu_pos,4}
{subs _mcolor,1,5,%palette}
{setv _menter,mpd} b c d e f g h i j k l m n o p q r s t u v w x y z
{setv _mlabel,um_?,um_?,um_?,um_?,um_?,um_?,um_?,um_?,um_?,um_?,um_?,um_?,um_?,um_n,um_?,um_?,um_?,um_?,um_?,um_?,um_?,um_?,um_?,um_?,um_?,um_?}
{menu %menu_pos,24,UPload} {setv menu_pos} {retu}
{:um_?} {call msn_prot} ;get protocol letter
{setv menu_pos}
{setv pr_file}
{:um_#} {inst _for1,%_prot}
{ifco-c gfnu,pufn} ;returns directly if (send).lst is OK
{ifex %_hom%csms%_prot.bat,bat_up} ;batch file has 1st priority
{comp eprot_%_prot} ;Protocol in Commospace has second priority
{ifco ,eup_#}
{inst _intp,%_prot} ;finally check for internal protocol
{ifco ,no_uprot}
{call um_%_prot} ;perform internal protocol
{call del_slst} {retu} ;del (send).lst and .REP
{:no_uprot}{info-d15 You have not defined the "%_prot%" Upload Protocol}
{goto u_prot}
{:eup_#}{call eup_%_prot} ;command lines at end of this macro
{comp swap_prot,y} {ifco-c eup_swap,eup_} {setv cmd}
{call del_slst} {retu}
{:eup_} {inst eprot_%_prot,$} {ifco eup_swap}
{exec-d %cmd} {retu} ;returns with errorlevel
{:eup_swap}{exec-s %cmd} {retu} ;does not return with errorlevel
{:bat_up} {exec-n echo CSMERR.FIL (%_prot%) Indicating file upload error> %_hom%csmerr.old}
{comp swap_prot,y} {ifco-c batu_swap,batu_}
{call del_slst} {retu}
{:batu_} {inst eprot_%_prot,$} {ifco batu_swap}
{exec %_hom%csms%_prot %_por %_spe %file %_pad %_irq %ver} {retu}
{:batu_swap}{exec-s %_hom%csms%_prot %_por %_spe %file %_pad %_irq %ver} {retu}
{:no_uprot}{info-d15 You have not defined the "%_prot%" Upload Protocol}{retu}
┌─────────────────────────────────────────────────────────┐
│ Notes: :pufn returns %_hom%... file list for "@" use │
│ :gfnu returns %file with one valid filename │
│ :test_lst returns with %lfile (name of file) │
│ :del_slst tests %lfile for .REP, .PST exts │
└─────────────────────────────────────────────────────────┘
{:um_wc}{inst file,*} {ifco-c gfn1} ;reject wildcards
{inst file,?} {ifco-c gfn1} ;for Xmodem
{inst file,@} {ifco-c gfn1} {retu}
{:z_send}{exec-n echo %pr_file>%_hom%^(send^).lst}
{:um_z} {szmo-r @%_hom%^(send^).lst} {retu}
{:yb_send}{exec-n echo %pr_file>%hom%^(send^).lst}
{:um_g} {symo-k @%_hom%^(send^).lst} {retu}
{:xk_send}{setv file,%pr_file}
{:um_o} {call um_wc} {sxmo-k %file} {retu}
{:um_c} {call um_wc} {sxmo %file} {retu}
{:um_a} {call um_wc} {asci-e %file} {retu}
{:h_send}{setv _prot,h} {exec-n echo %pr_file>%_hom%^(send^).lst} {goto eup_#}
{:um_n}
{:u_nulmodem} {comp l_parm} {ifco u_prot}
{setv _menu1, F Send Any File}
{setv _menu2, M Send *.CSM files}
{setv _menu3, Q Send *.QWK files}
{setv _menu4, R Send *.REP files}
{setv _menter,dm_n}
{setv _mlabel,,,,,,um_nf,,,,,,,um_nm,,,,um_nq,um_nr}
{menu 8,29,NUL Modem ■ SEND}
{goto pgu}
{:um_nf}{setv proto,NUL Modem} {call pufn}
{call nul_up} {setv proto} {}
{:um_nm}{exec-n echo %_hom%*.csm> %_hom%^(send^).lst} {call nul_up}{}
{:um_nq}{exec-n echo %qwkdr\*.qwk> %_hom%^(send^).lst}{call nul_up}{}
{:um_nr}{exec-n echo %repdr\*.rep> %_hom%^(send^).lst}{call nul_up}
{info-q0 Delete %repdr\*.rep now?} {ifco ,stop}
{exec-n del %repdr\*.rep>NUL} {}
{:del_slst}{setv file,%_hom%^(send^).lst}
{:del_lst} ;delete used upload list
{call alar}
{ifer 1,retu}
{exec-n del %file>NUL}
{setv file,%lfile}
{subs ext,-3,3,%file}
{comp ext,rep} {ifco del_rep}
{comp ext,pst} {ifco del_rep}
{retu}
{:del_rep} ;prompted .REP delete
{wind-k} ;times out in 10 secs to do delete
{info-d1s0 Delete %file [Y/n]?}
{setg 10,rep_gon,l}
{gets-hi ch,1}
{comp ch,n} {ifco ,rep_gon} {wind} {retu}
{:rep_gon}
{exec-n del %file>NUL} {setv lfile} {wind} {retu}
┌───────────────────────────────────────────────┐
│ Set download directory for %hold_dr support │
└───────────────────────────────────────────────┘
{:pik_dld}{comp hold_dr} {ifco dl_2dl,dl_2hd}
{:dl_2dl} {setv dl_dir,%dldir} {retu}
{:dl_2hd} {setv dl_dir,%hold_dr} {retu}
{:strew_}
{comp %hold_dr} {ifco no_hold}
{info-qs0 Sort contents of Hold directory now? } {ifco ,retu}
{:bya} {call strew_,cs-logon.csm} {retu}
{:no_hold}
{info-d20s0 Hold directory invalid ^(%%hold_dr,%hold_dr^) ■ Change CS-MAC%ver.CFG}
{setv hold_dr}
{retu}
┌──────────────────────────┐
│ Download protocol menu │
└──────────────────────────┘
{:mpd}
{:ppd}
{:d_prot}{call prot_menu}
{incr menu_pos,4}
{subs _mcolor,7,5,%palette}
{setv _menter,mpu} b c d e f g h i j k l m n o p q r s t u v w x y z
{setv _mlabel,dm_?,dm_?,dm_?,dm_?,dm_?,dm_?,dm_?,dm_?,dm_?,dm_?,dm_?,dm_?,dm_?,dm_n,dm_?,dm_?,dm_?,dm_?,dm_?,dm_?,dm_?,dm_?,dm_?,dm_?,dm_?,dm_?}
{menu %menu_pos,24,DOWNload} {setv menu_pos} {retu}
{:dm_?} {call msn_prot} :get protocol letter
{setv menu_pos}
{setv pr_file}
{:dm_#} {call pik_dld} ;hold dir or download dir?
{:d_mail} ;dl_dir set by CS-LOGON mailrun routine
{ifex %_hom%csmr%_prot.bat,bat_dn};batch file has 1st priority
{comp eprot_%_prot} ;Protocol in Commospace has second priority
{ifco ,edn_#}
{inst _intp,%_prot} ;finally check for internal
{ifco ,no_dprot}
{call dm_%_prot} {call alar} {retu}
{:no_dprot}{info-d15 You have not defined the "%_prot%" Download Protocol}
{goto d_prot}
{:edn_#}{call edn_%_prot} ;command lines at end of this macro
{comp swap_prot,y} {ifco-c edn_swap,edn_} {setv cmd}
{call alar} {retu}
{:edn_} {inst eprot_%_prot,$} {ifco edn_swap}
{exec-d %cmd} {retu} ;returns with errorlevel
{:edn_swap}{exec-s %cmd} {retu} ;does not return with errorlevel
{:bat_dn} {exec-n echo CSMERR.FIL (%_prot) Indicating file download error> %_hom%csmerr.old}
{comp swap_prot,y} {ifco-c batd_swap,batd_}
{call alar} {retu}
{:batd_} {inst eprot_%_prot,$} {ifco batd_swap}
{exec %_hom%csmr%_prot %_por %_spe %dl_dir %_pad %_irq %ver} {retu}
{:batd_swap}{exec-s %_hom%csmr%_prot %_por %_spe %dl_dir %_pad %_irq %ver} {retu}
{:z_recv}{setv dl_dir,%pr_file} called from mosthost
{:dm_z} {goto zmr_%zr_mode} Zmodem batch
{:zmr_}
{:zmr_s}{rzmo %dl_dir} {retu} Skip (default)
{:zmr_r}{rzmo-r %dl_dir}{retu} Resume
{:zmr_n}{rzmo-n %dl_dir}{retu} Rename
{:zmr_o}{rzmo-y %dl_dir}{retu} Overwrite
{:yg_recv}{setv dl_dir,%pr_file} called from mosthost
{:dm_g} {rymo-gy %dl_dir} {retu}
{:yb_recv}{setv dl_dir,%pr_file} called from mosthost
{:dm_y} {rymo-y %dl_dir} {retu}
{:dm_o} {setv file,%dl_dir%\} {inpu file,Filename to Download (1k-Xmodem)} {rxmo %file} {retu}
{:dm_c} {setv file,%dl_dir%\} {inpu file,Filename to Download (Xmodem CRC)}
{:xc_recv} {comp pr_file} {ifco-c ,pr_f-2-f}
{rxmo %file} {retu}
{:pr_f-2-f}{setv file,%pr_file} {retu} for mosthost
{:dm_a} {goto capture_}
{:h_recv}{setv _prot,h} {setv dl_dir,%pr_file} {goto d_mail} called by mosthost
{:dm_n}
{:d_nulmodem} {comp l_parm} {ifco d_prot}
{setv _menu1, F Receive Any File}
{setv _menu2, M Receive *.CSM files}
{setv _menu3, Q Receive *.QWK files}
{setv _menu4, R Receive *.REP files}
{setv _menter,um_n}
{setv _mlabel,,,,,,dm_nf,,,,,,,dm_nm,,,,dm_nq,dm_nr}
{menu 8,32,NUL Modem ■ RECEIVE}
{goto pgd}
{:dm_nf}{setv file,%dldir}{inpu file,NUL Modem ■ Download directory}
{call nul_dn} {}
{:dm_nm}{setv file,%dldir}{call nul_dn}
{info-q Shell _and_ copy *.CSM from %dldir to %_hom%?}
{ifco ,stop}{exec-sw5 copy %dldir\*.csm %_hom%*.csm}{}
{:dm_nq}{setv file,%qwkdr}{call nul_dn} {}
{:dm_nr}{setv file,%repdr}{call nul_dn} {}
┌────────────────────────────┐
│ NUL modem file transfers │
└────────────────────────────┘
{:loc_por} ;routine to set port
{setv por,%_por} ;save dial-out port
{setv spe,%_spe} ;save dial-out speed
{sete-p0 o_dial} ;reset on ESCape
{parm %l_parm} ;l_parm == speed,,port
{wind-k} ;save windows
{setv _mlabel,nul_a} ;set label for 'A'
{keys 61} ;stuff 'A' keystroke
{menu 13,64,%nul_s} ;display "NUL Modem"
{:nul_a}{setv savlog,%_uselog} ;no log of NUL xfer
{setv _uselog,%l_use} ; if %l_use == NUL
{comp _uselog} {ifco retu}
{wope-a %_uselog} ;open NULmodem xferlog
{writ} {writ %_dat %_tim} ;mark time
{wclo} {retu}
{:nul_up}{sete-p0 o_dial}
{ifex %_hom%^(send^).lst,,no_file}
{setv nul_s, NUL Modem } {call loc_por} ;set local port/log
{szmo-r @%_hom%^(send^).lst} {goto o_dial} ;reset after upload
{:nul_dn}{sete-p0 o_dial}
{setv nul_s, NUL Modem } {call loc_por} ;set local port/log
{rzmo-n %file}
{:o_dial} ;post-action reset
{info-d10s0 NUL modem ■ Errorlevel = %_err}
{wind} ;clear windows
{parm %spe,,%por} ;Reset port
{setv por} {setv spe} {setv nul_s} ;save variable space
{setv _uselog,%savlog} {setv savlog} ;reset uselog
{call del_slst} {retu}
{:no_file} {info-d5s0 ^(send^).lst not found} {goto um_n}
┌─────────────────────────────────┐
│ Pick upload filename selector │
└─────────────────────────────────┘
{:q_exp}{info-d15s0 Upload List Manager is an Expert feature. Taking you to see @ML help!}
{setv var,@ml}{setv stuft,y}{goto csmhc,cs-mac.csm}
{:xfl_m}{setv _mlabel,,,,,ed_snd,,,,,,,,,,,pm_p,mm_ml,pm_r,1_fil,,selud}{retu}
{:pufn} {sete}
{comp action,on} {ifco retu} ;skip checking if "in action"
{ifex %_hom%^(send^).lst,,puf1};test then use existing
{setv file,%_hom%^(send^).lst} ; upload list
{call test_lst} {setv file,%lfile} {retu}
{:puf1} {setv _menu1, P ■ PNS}
{setv _menu2, R ■ REP file}
{setv _menu3, S ■ Single file input}
{setv _menu4, E ■ Edit ^(send^).lst}
{setv _menu6, Q ■ to List Manager}
{setv _menter,pm_p}
{setv _mlabel,,,,,ed_snd,,,,,,,,,,,pm_p,q_exp,pm_r,1_fil,,selud}
{comp xpert,y} {ifco-c xfl_m}
{menu 10,28,Make ^(send^) List}
{ifca ,stop} {send ^x^x^x^x^x^x^x} {}
{:ed_snd}{setv file,%_hom%^(send^).lst} {goto ed_lst}
{:pm_p} {setv file,%_hom%^(send^).lst}
{ifex %ext_fl,pns}
{comp fb_mac} {ifco-c fb_mac} ;make sure %fb_mac is defined
{ifex %_hom%%fb_mac,sel_m}
{goto ed_lst} ;only if neither PNS or COMMO.MAC exist
{:sel_m}{goto select,%fb_mac} ;this routine ends w/(retu) command
{:pns} {exec-n cd %uldir} ;Pick N Send
{exec-d %ext_fl %file -F}
{retu}
{:pm_r} {setv file,%repdr\%bbsid.%rep}
{inpu file,REP to upload}
{ifex %file,w_fil} {}
{:1_fil}{call gfnu}
{inst file,@} {ifco ed_snd} ;edit send.lst
{ifex %file,,stop} ;gfnu checks filenames, but not when
{:w_fil}{wope %_hom%^(send^).lst} ; ESC leaves gfnu
{writ %file} {wclo} {retu}
┌──────────────────────────────┐
│ Get Single Upload FileName │
└──────────────────────────────┘
{:gfnu} {comp action,on} {ifco retu} ;if in action file, no checking
{ifex %_hom%^(send^).lst,,gfn1};test then use existing
{setv file,%_hom%^(send^).lst} ; upload list
{call test_lst} {setv file,%lfile} {retu}
{:gfn1} {sete-p0 retu} {setv file,%uldir\}
{:gfn2} {inpu file,Filename for %proto% upload (.ZIP default)}
{comp file,%uldir\} {ifco stop}
{comp file} {ifco stop}
{setv fileh,%file}
{inst file,@} {ifco retu}
{inst file,*} {ifco chek}
{inst file,.} {ifco chek}
{ifex %file,fretu}
{setv file,%file%.zip}
{:chek} {ifex %file,fretu}
{:mask} {exec-nw15 dir %fileh*.*}
{setv file,%fileh}
{goto gfn2}
{:fretu}{setv fileh}
{setv lfile,%file} ;save value for send description
{call w_fil} {retu} ; via Alt-M,L,L facility
┌───────────────────────────┐
│ Upload filelist Manager │
└───────────────────────────┘
* subroutine to pick and use a file upload list
{:ul_mngr}
{:mm_ml}{pops} {push} {sete} ;hold to support calling :selud
{ifex %_hom%^(send^).lst,mng_snd} ;Choose (send).lst
{ifex %uldir\*.lst,do_mmml,pufn} ;skip confusing menu if no *.LST
{comp xpert,y}{ifco ,pufn} ;skip confusing menu if no xpert
{:do_mmml}
{call mm_mlmake}
{setv _menu%count, Q ■ Edit Lists} {incr count}
{setv _menu%count, L ■ Last Filename Information}{incr count,2}
{setv _menu%count, <CR> to make ^(send^).lst}
{setv _menter,puf1}
{setv _mlabel,u_sel,u_sel,u_sel,u_sel,u_sel,u_sel,u_sel,u_sel,u_sel,u_sel,,l_fil,,,,,q_sel,,,,selud}
{incr count,4}
{subs _mcolor,13,5,%palette}
{menu %count,44,Copy Upload List to ^(send^).lst}{pops-c}
{call clr_ffn} {}
* subroutine to pick and edit a file upload list
{:q_sel}{comp xpert,y} {ifco ,pufn}
{pops} {push} {rclo} {sete}
{call mm_mlmake}
{setv _menu%count, Q ■ Quit to "Copy to ^(send^)" Menu}{incr count}
{setv _menu%count, R ■ Remove/Delete a filelist}{incr count,2}
{setv _menu%count, <CR> to make a new *.lst}
{setv _menter,mm_lstmake}
{setv _mlabel,l_ed,l_ed,l_ed,l_ed,l_ed,l_ed,l_ed,l_ed,l_ed,l_ed,,,,,,,mm_ml,q_selr,,,selud}
{subs _mcolor,19,5,%palette}
{incr count,4}
{menu %count,44, Edit Upload Filelists }
{call clr_ffn} {}
{:l_ed} {pops}
{comp ffn%_msn} {ifco q_sel}
{setv-s file,ffn%_msn} {call clr_ffn}
{setv file,%uldir\%file} {call ed_lst} {goto q_sel}
* subroutine to make new upload list file
{:mm_lstmake} {setv file,%uldir\.lst} {keys 4be0,4be0,4be0,4be0}
{inpu file,Make Upload *.lst}
{comp file,%uldir\.lst} {ifco q_sel}
{info-qs0 Use File Picker?}
{ifco ,mm_led}
{ifex %ext_fl,mmlpns}
{comp fb_mac} {ifco-c fb_mac}
{ifex %_hom%%fb_mac,mmlsel}
{:mm_led}{edit %file} {call test_lst} {goto q_sel}
{:mmlsel}{info-d15 %fb_mac:select makes only ^(send^).lst} {goto q_sel}
{:mmlpns}{exec-n cd %uldir}
{exec-d %ext_fl %file -F} {goto q_sel}
* subroutine to choose list file to delete
{:q_selr}{pops}
{call mm_mlmake}
{decr count} {setv _menu%count}
{setv _menter,q_sel}
{setv _mlabel,l_de,l_de,l_de,l_de,l_de,l_de,l_de,l_de,l_de,l_de}
{subs _mcolor,31,5,%palette}
{incr count,2}
{menu %count,44, Delete %uldir\*.lst } {goto q_sel}
{:l_de}
{comp ffn%_msn} {ifco q_selr}
{setv-s file,ffn%_msn}
{call clr_ffn}
{info-q0s0 Delete %uldir\%file?}
{ifco ,q_selr}
{exec-n del %uldir\%file>NUL} {goto q_selr}
* subroutine to make menu from *.lst files in %uldir
{:mm_mlmake}
{setv count,1}
{file %uldir\*.lst}
{ifco ,nulul}
{:ulm_l}{setv pad, } {setv pad_l,12}
{leng %_ffn} {decr pad_l,%_len} {subs pad,1,%pad_l,%pad} {setv pad_l}
{setv _menu%count, %count ■ %_ffd %_ffn %pad (%_ffs% bytes)}
{setv ffn%count,%_ffn}
{incr count}
{file-x %uldir\*.lst} {ifco ulm_l}
{incr count}
{:nulul}{setv _menu%count, U ■ Change Upload Dir (%uldir)}
{incr count}
{retu}
* subroutine to copy selected *.lst to (send).lst
{:u_sel}{pops-c} {setv-s file,ffn%_msn} {call clr_ffn}
{exec-n copy %uldir\%file %_hom%^(send^).lst>NUL}
{comp file} {ifco ed_snd} {setv file}
* subroutine to work with (send).lst
{:mng_snd} {pops}
{setv file,%_hom%^(send^).lst} ;work with (send).lst
{call test_lst} ;test filenames in (send).lst
{ifex %_hom%^(send^).lst,,retu}; in case :test_lst erases small file
{:nxtfi}{rope %_hom%^(send^).lst,rclo} ;open send list
{:nxtfl}{read ffile} ;read filename
{:lfile}{setv file,%ffile} ;%fil is short name, %file is complete
{call dr_of} {setv fil,%file} {setv file,%ffile}
{setv _menu1, N,U ■ %fil (fileName)}
{setv _menu2, D,I ■ Description}
{setv _menu3, S ■ Short description}
{setv _menu5, E ■ Edit ^(send^).lst}
{setv _menu6, R ■ Reset/Cancel}
{setv _menu8, <CR> next filename}
{setv _menter,nxtfl}
{setv _mlabel,,,,mmold,ed_snd,,,,mmold,,,,,mm_oln,,,q_sel,mm_olr,mm_ols,,mm_oln}
{menu 12,38,File Upload Info}
{:rclo} {rclo} {retu}
{:mm_oln} {rclo} {send ~%fil|} {retu}
{:mm_olr} {rclo} {exec-n del %_hom%^(send^).lst>NUL} {setv lfile} {goto mm_ml}
{:mm_ols} {setv omax_desc,%max_desc} {setv max_desc,1}
{call mmold}
{setv max_desc,%omax_desc} {setv omax_desc} {retu}
* subroutine to use "last filename tested" %lfile
{:l_fil}{pops} {comp lfile} {ifco no_lfile}
{setv ffile,%lfile}
{rope %uldir\NUL,rclo}{goto lfile}
{:no_lfile}{info-d5s0 There is No "last-file" information}{}
* subroutine to test each file in any list of files (listfile)
* subroutine to edit a file list (listfile)
{:test_lst}
{file %file} ;look for listfile
{ifco ,stop} ;if no listfile, quit
{comp _ffs,3} {ifco-l del_lst} ;delete small listfile & quit
{rope %file,retu} ;open send listfile
{:tstfi}{setv lfile,%ffile}{read ffile};read filename
{ifex %ffile,tstfi} ;verify that all files exist
{exec-nw15 dir %ffile*.*}
{info-d8s0 %ffile doesn't exist! ■ Re-edit ^(send^).lst}
{:ed_lst}{rclo} {edit %file}
{goto test_lst}
{:clr_ffn} {setv count,1}
{:llr_ffn} {comp ffn%count} {ifco retu}
{setv ffn%count} {incr count} {goto llr_ffn}
┌───────────────────────────────┐
│ Send DESC.SDI Automatically │
└───────────────────────────────┘
{:mmold}{comp %ramdr} {ifco retu} ;make sure %ramdr is defined
{ifex %ramdr\NUL,,retu} ;make sure %ramdr is valid
{rclo} {setv filen,file_id.diz}
{comp file,%uldir\} {ifco retu}
{exec-d %pk_un -v %file desc.sdi file_id.diz}
{ifer 1,no_dsc}
{:add_dsc}
{exec-d %pk_un -v %file %filen}
{ifer 1,chk4_sdi}
{exec-s %pk_un -o %file %ramdr\ %filen}
{rope %ramdr\%filen,end_dsc}
{setv count,1}
{:diz_loop}
{read line} {send ~%line|}
{comp max_desc} {ifco diz_loop}
{incr count} {comp count,%max_desc}
{ifco-le diz_loop,end_dsc}
{:chk4_sdi}
{setv filen,desc.sdi}
{goto add_dsc}
{:no_dsc} {info-d5s0 No description found for %file}
{:end_dsc}
{exec-n del %ramdr\%filen>NUL}
{setv filen} {retu}
┌───────────────────────────┐
│ Select Upload Directory │
└───────────────────────────┘
{:selud}{setv count,0}
{:conf} {incr count}
{sete-p0 ul%count}
{inpu uldir,Select Upload directory (omit trailing"\")}
{subs temp,-1,1,%uldir} {comp temp,\} {ifco selud}
{ifex %uldir\NUL,retu,selud}
{:ul1} {setv uldir,%_hom}
{leng %_hom} {setv len,%_len}
{decr len} {subs uldir,1,%len,%uldir}
{setv len} {goto conf}
{:ul2} {setv uldir,%ramdr} {goto conf}
{:ul3} {setv uldir,%repdr} {goto conf}
{:ul4} {setv uldir,%znpak} {goto conf}
{:ul5} {setv uldir,%picdr} {goto conf}
{:ul6} {setv uldir,%dldir} {goto conf}
{:ul7} {setv uldir,%ul_dir} {goto conf}
{:ul8} {retu}
┌──────────────────────────────────────────────┐
│ Send filenames from your download wishlist │
└──────────────────────────────────────────────┘
{:mm_ow}{ifex %dldir\wishlist,,mm_mw} ;Use (or edit) Download Wishlist
{info-qs0 Use Download Wishlist?}
{ifco ,mm_mw}
{rope %dldir%\wishlist,retu}
{sete-p0 r_cpd} ;Set ESCape to read next line
{:r_cpd}{read file}
{ifex %dldir%\%file,r_cpd}
{leng %file} {comp %_len,0} {ifco r_cpd}
{inpu file,<CR> sends "%file " to Host ■ [Esc] shows next}
{send %file } {goto r_cpd}
┌───────────────────────────────────────┐
│ Make and maintain download Wishlist │
└───────────────────────────────────────┘
{:mm_mw}{ifex %dldir%\wishlist,,ed_w} ;Make generic download list
{exec-n copy %dldir%\wishlist %dldir%\dl-temp>NUL}
{rope %dldir%\dl-temp,e_kp3}
{wope %dldir%\wishlist}
{:kp3_l}{read file}
{ifex %dldir%\%file,kp3_l}
{writ %file} {goto kp3_l}
{:e_kp3}{wclo}
{exec-n del %dldir%\dl-temp>NUL}
{:ed_w} {goto ed_w,cs-mac.csm}
┌────────────────────────────────────────────────────┐
│ Download list tagging using COMMO built-in tools │
└────────────────────────────────────────────────────┘
{:fon_star} {ifca stop}
{:fon_mark} {ifca mlist} ;Alt-D first checks for CARRIER
{dial} {retu} ;If NO, bring up dialing directory
{:mlist}{scre n,%_hom%dl-list} ;If CARRIER ONLINE, name screen image
{scro} ;Enter scrollback mode:
{edit %_hom%dl-list} ;Enter COMMO's built-in editor:
{ifex %_hom%dl-list,,retu}
{info-qs0 Start DownLoad Now?};A chance to exit
{ifco go-dl,retu} ; before start of d/l.
{rope %_hom%dl-list} ;Open just made list
{:go-dl}{info-q Send DL-LIST now?}
{ifco ,retu}
{rope %_hom%dl-list,end-dl} ;Open file list for reading
{:next-1}
{read file} ;Read one complete line into %file%
{subst file,1,12,%file} ;Strip all but first 12 characters
{send ~~~%file%|} ;Send filename to BBS
{goto next-1} ;Repeat read unti dl-list is all read
{:end-dl}
{exec-n del %_hom%dl-list>NUL};Delete the list after sending
{send ~|} {retu} ;This macro is ended.
┌───────────────────┐
│ File-Edit-Menus │
└───────────────────┘
{:dr_of}{subs file,-12,12,%file} ;take drive and dir name
{inst file,\}{ifco ,retu} ; off variables for better
{setv pos,%_pos}{incr pos} ; display in menus. Examples,
{subs file,%pos,12,%file} ; c:\co\sav\Address -> Address
{goto dr_of} ; c:\jr\Jabber.exe -> Jabber.exe
{retu}
{:cte} {keys 73,3a,6d,78,0d} ;Edit jumps to string ":mx"
{macr edit_cs-commo} {} ;Edit home macro w/Ctl-E
;mky=cte,1205 in COMMO.SET
;Alt-ME gets here too
┌────────────────────────────────────────┐
│ Internal or External LIST subroutine │
└────────────────────────────────────────┘
{:list_it}
{ifex %file,,retu}
{ifex %ext_li,,in_li}
{keys 4fe0}
{exec-n %ext_li %file} {retu}
{:in_li}{inst file,*} {ifco retu}
{inst file,?} {ifco retu}
{edit %file} {retu}
┌────────────────────────┐
│ Macro selection menu │
└────────────────────────┘
{:load_commo}
{comp fb_mac} {ifco-c fb_mac} ;load COMMO.MAC as auxiliary macro
{goto alu,%fb_mac}
{:macro_menu}
{comp fb_mac} {ifco-c fb_mac}
{comp _aux,%fb_mac} {ifco-c unlo}
{ifca mm_o} {:alm_o}
{setv _menu1, A ■ Activate Autopilot CS-PILOT.CSM,auto}
{setv _menu2, N ■ New BBSID for COMMO.FON CS-MAC.CSM,new_bbsid}
{setv _menu3, F ■ Make ACTION file CS-ACTON.CSM,act_alf}
{setv _menu4, H ■ Load HOST Mode MOSTHOST.MAC,bbs}
{setv _menu5, R ■ Send REP files}
{setv _menu7, M ■ More Macros / submenu}
{setv _menu8, O ■ Online Macro Menu}
{setv _menu9, U ■ Unload Auxiliary Macro %_24h%:%_min}
{setv _menter,do_ap}
{setv _mlabel,cta,,,mm_d,cte,action_make,,mm_h,,,show_keys,mm_ml,mm_m,mm_n,mm_o,mm_mp,edit_menu,send_rep,mm_ms,,unlo,var_peek,mm_mw,mx,,mm_mz}
{subs _mcolor,13,5,%palette}
{menu 13,56, CS-MAC%ver Macro Menu}
{retu}
{:start_ap} {:cta} ;Start Autopilot w/Ctl-A
{ifex %_hom%cs-pilot.csm,,retu} ;mky=cta,1e01 in COMMO.SET
{goto to_y,cs-pilot.csm} ;Alt-M,A gets here too
{:do_ap}{wind} {setv skip}
{comp auto,y} {ifco ,retu}
{goto auto,cs-pilot.csm}
{:mm_d} {setv debug,y} {info-d10 Debug variable (%%debug) has been set}
{goto fon_mark}
{:mm_h} {setv pr_down,%dldir} ;set to Fred Brucker standards
{setv pr_up,%uldir}
{goto bbs,mosthost.mac}
{:mm_n} {call new_bbsid,cs-mac.csm} {retu}
┌──────────────────────────────┐
│ Offline Utility Macro Menu │
└──────────────────────────────┘
{:mm_m} {setv _menu1, P ■ Playspace macro}
{setv _menu2, B ■ Backup Commo files to %bu_dr}
{setv _menu3, C ■ Compile a macro to .CCM}
{setv _menu4, W ■ Wishlist maintenance}
{setv _menu5, L ■ Manage Upload Filelists}
{setv _menu6, V ■ Variable Peek/Poke}
{setv _menu7, S ■ Strip comments from MAC CS-MAC.CSM,strip}
{setv _menu8, F ■ Fgrep Utilities CS-MAC.CSM,fgrep_ut}
{setv _menu9, H ■ Hold directory CS-LOGON.CSM,strew_}
{setv _menu10, X ■ Add external protocol CS-MAC.CSM,add_eprot}
{setv _menu11, Z ■ Macro under development %dev_mac,%dev_st}
{setv _menter,do_ap}
{setv _mlabel,,back_up,compile_,,cte,fgrep_ut,,strew_,,,show_keys,q_sel,macro_menu,,mm_o,mm_mp,edit_menu,,mm_ms,,load_commo,var_peek,mm_mw,add_eprot,,mm_mz}
{menu 15,56, Macro Utility Submenu }
{goto macro_menu}
{:mm_ms}{call strip,cs-mac.csm} {retu}
{:mm_mz}{call %dev_st,%dev_mac} {retu}
{:compile_} {inpu file,What file do you want to compile?}
{ifex %_hom%%file,,no_compile}
{unlo}
{file %_hom%%file}
{inst %_ffn,.} {setv pos,%_pos}
{decr pos} {subs fnam,1,%pos,%_ffn}
{incr pos,2} {subs ext,%pos,3,%_ffn} {setv pos}
{wope-a %_hom%%file}
{writ ^(^)}
{writ CS-MAC%ver %_dat %_24h%:%_min%:%_sec ^(unlo^)}
{writ DOS> ^(exec ren %_hom%%fnam.%ext %fnam.src^) Autocompiler}
{writ ^(exec ren %_hom%%fnam.ccm %fnam.%ext^) ^(unlo^)}
{writ}
{writ %fnam.%ext has been compiled into %fnam.CCM}
{writ Scroll up to unload, Press ENTER to rename before unloading ....}
{writ}
{writ ^(:auto_compile^) ^(keys 2e00,0d^) ^(macr autocompiler^)}
{wclo}
{setv fnam} {setv ext}
{goto auto_compile,%file}
{:no_compile} {info-d10s0 %_hom%%file does not exist. Auto compile stopped.}{}
┌──────────────┐
│ Play Space │
└──────────────┘
{:mm_mp}{ifex-c %_hom%play.mac,,make_play}
{goto top,play.mac} {}
{:make_play}
{wope-a %_hom%play.mac}
{writ CS-MAC Playspace for testing new macro ideas}
{writ Default PLAY.MAC made on %_mon%/%_day%/%_yea% at %_24h%:%_min%:%_sec%}
{writ} {writ ^(:top^) ^(keys 73,3a,6d,78,0d^) ^(macr playsp^)}
{writ ^(:mx^) ^(^)} {writ} {wclo} {retu}
┌─────────────────────┐
│ ONLINE Macro menu │
└─────────────────────┘
{:mm_o} {setv _menu1, F1 ■ Key Help}
{setv _menu3, C ■ Command recall}
{setv _menu4, H ■ Hold directory change}
{setv _menu5, L ■ List manager - Uploads}
{setv _menu6, P ■ Run PCBoard ACTION}
{setv _menu7, R ■ Record Macro}
{setv _menu8, S ■ Search Address}
{setv _menu9, W ■ Use Download Wishlist}
{setv _mlabel,show_keys,strings,recall_cmd,,cte,mm_f,,mm_oh,,,mm_k,mm_ml,alm_o,,alm_o,mm_op,edit_menu,mm_or,srch_addr,,,,mm_ow,mm_ox}
{subs _mcolor,13,5,%palette}
{setv _menter,retu}
{menu 13,33, Online ■ F2 Strings }
{goto alm_o}
┌────────────────────────────────────────┐
│ A tool to search a file for a string │
└────────────────────────────────────────┘
{:srch_addr}{setv file}
{inpu file,Search %address for name}
{comp file} {ifco retu}
{setv srch_fil,%address}
{call search} {setv srch_fil}
{comp addr} {ifco retu}
{wind-k}
{subs file,1,20,%addr}
{subs addr,25,42,%addr}
{setv _menu1, Spacebar sends ....}
{setv _menu3,%addr}
{setv _menu5, [T]elnet, [F]tp, [N]talk prefix}
{setv _mlabel,anf5}
{keys 61}
{menu 9,52,%file}
{:anf5} {setl}
{golo enf5,^[}
{golo snd5, }
{golo tnd5,t}
{golo fnd5,f}
{golo nnd5,n}
{look ^m}
{:enf5} {wind} {setv addr} {setv file} {retu}
{:snd5} {send %addr~|} {goto enf5}
{:tnd5} {send %tn_pf %addr~|}{goto enf5}
{:fnd5} {send ftp %addr~|} {goto enf5}
{:nnd5} {send talk %addr~|} {goto enf5}
{:searcher}
{setv srch_fil,%savedir\}
{inpu srch_fil, Which Directory to search? }
{comp srch_fil,%savedir\} {ifco retu}
{ifex %srch_fil,,nf9} {setv file}
{inpu file, Search %srch_fil for: }
{:search}
{rope %srch_fil,eloop}
{wind-k}
{spdc n}
{:aloop}{send ^h}
{read addr}
{inst addr,%file} {ifco ,aloop}
{subs addr,1,80,%addr}
{setv _menu1,%addr}
{setv _mlabel,nloop}
{keys 61}
{menu ,53, "S" to search ╠═══════╣ SPACEbar to select }
{:nloop}{setl 8,aloop}
{golo aloop,s}
{golo eloop, }
{look Searching %srch_fil}
{wind} {rclo} {spdc y} {setv addr} {goto do_ap} ;ESCape response
{:eloop}{wind} {rclo} {spdc y} {paus-t 2} {retu} ;SPACE response
┌─────────────────────────────┐
│ Command Recall Subroutine │
└─────────────────────────────┘
{:recall_cmd} {setv count,0}
{setv lett,123456789JKLMNOPQR}
{:mm_ocl}{incr count}
{comp sc_%count} {ifco mm_ocm} ;is there a command#n?
{setv-s cmd,sc_%count} ;ifso, make it a menu item
{subs char,%count,1,%lett}
{setv _menu%count, %char ■ %cmd} ; otherwise, show menu
{comp count,19} {ifco mm_ocm,mm_ocl} ;max # of items is 18
{:mm_ocm}{setv _menter,lrn_sc} {setv lett} ;command recall save menu
{incr count} {setv cmd}
{setv _menu%count, <CR> ≡ Learn New Command S ≡ Save to CFG}
{setv _mlabel,sc_,sc_,sc_,sc_,sc_,sc_,sc_,sc_,sc_,sc_,sc_,sc_,sc_,sc_,sc_,sc_,sc_,sc_,sc_sav,,,,clr_sc}
{incr count,4}
{menu %count,49,Command recall menu}{} ;show the menu
{:sc_} {setv-s cmd,sc_%_msn} ;picked a command# to send
{comp cmd}{ifco stop} ;drop out if command is NUL
{send %cmd|}{setv cmd} {} ;send command otherwise
{:lrn_sc}{decr count,5} ;Learn new command
{setg ,stop,l} {sete-p0 stop}
{comp count,19} {ifco-c rol_sc} ;if >18, roll the stack
{setv _menu1, S ■ Learn from scrollback}
{setv _menu2,<CR> Learn from keyboard}
{setv _menter,lrn_kb}
{setv _mlabel,,,,,,,,,,,,,,,,,,,lrn_sb}
{menu 6,34, Learn Command menu} {retu}
{:lrn_kb}{disp ,,0c,^h^h^h^h^h rcl>} ;prompt showing recall learn
{gets-i sc_%count} ;get and save command
{setv-s cmd,sc_%count} {send %cmd|} ; <CR> terminates learn
{setv cmd}{setv lett} {} ; cleanup and end learn
{:lrn_sb}{scre n,%ramdr\sc_temp} {keys 77} {scro}
{ifex %ramdr\sc_temp,,retu}
{edit %ramdr\sc_temp}
{ifex %ramdr\sc_temp,,retu}
{rope %ramdr\sc_temp} {read sc_%count}
{rclo} {exec-n del %ramdr\sc_temp>NUL}
{goto recall_cmd}
{:rol_sc}{setv cn,1}{setv cn2,2} ;roll the stack routine
{:rol_lp}{setv-s sc_%cn,sc_%cn2} ;move 2->1 ...
{incr cn}{incr cn2} ;increment counters until
{comp cn,18}{ifco ,rol_lp} ;move 18->17
{setv count,18}{setv cn}{setv cn2}{retu};go back to learn command #18
{:clr_sc}{info-q0 Confirm wipe-out of all Saved Commands} {ifco ,stop}
{decr count,5} ;clear command menu
{:clr_lp}{setv sc_%count}{decr count} ;starting with largest value
{comp count,0}{ifco stop,clr_lp} ;until menu is clear
{:sc_sav}{setv count,1}
{rope %_hom%cs-mac%ver.cfg,sc_wrt}
{:sc_clo}{read line}
{inst line,sc_%count,}
{ifco sc_ow,sc_clo}
{:sc_wrt}{rclo}
{wope-a %_hom%cs-mac%ver.cfg}
{writ}
{writ %_dat %_tim Save Commands Added}
{:sc_wlo}{setv-s cmd,sc_%count}
{comp cmd} {ifco stop}
{writ sc_%count,%cmd}
{incr count}
{goto sc_wlo}
{:sc_ow}{info Your Config file already has save commands in it. Aborting.}{}
{:mm_oh}{inpu hold_dr,Input or Change download Hold Directory}
{comp hold_dr} {ifco retu}
{ifex %hold_dr\NUL,retu,mm_oh}
{:mm_op}{ifex %_hom%action.%abbr,,no_ab}
{info-qs0 Confirm: Run ACTION.%abbr now?}
{ifco ,retu} {goto action,cs-acton.csm}
{:no_ab}{info-d7 No Action file exists for this call}
{setv abbr,ZZ}
{info-q0s0 Make ACTION.%abbr?}
{ifco ,retu}
{call opena,cs-acton.csm} {goto mm_op}
{:mm_or}{ifca learn}
{setv record,y}
{comp jb_learn,y} {ifco mm_orjbl}
{call def_mac,cs-pilot.csm}
{call def_lbl,cs-pilot.csm}
{setv alrn_tim,15} {inpu alrn_tim,Seconds of idle BBS before guessing response.}
{:mm_orjbl}
{info-d10s0 Learn mode activated for one call. Use linked macro ^(glr^)}
{goto fon_mark}
{:mm_ox}{call make_key,cs-pilot.csm} {}
┌──────────────────────────────┐
│ Toggles and Autopilot mode │
└──────────────────────────────┘
{:r_log}{disp ,,,%_tim %_dat^m}
{exec-N echo %_dat at %_24h%:%_min%:%_sec% >> %savedir\ring.log}
{goto do_ap}
┌───────────────────────┐
│ Toggle CAPTURE mode │
└───────────────────────┘
{:def_cap} {setv cap,%_yea%%_mon%%_day.cap} {retu}
{:capm_f} {setv capm,f} {retu}
{:cap_esc} {stat y} {disp %row,%col} {setv row} {setv col}
{setv capm} {setv cap} {retu}
{:capture_}
{comp capt,on} {ifco cof}
{sete-p0 cap_esc}
{setv row,%_row} {setv col,%_col} {stat n}
{disp %_slp,30,70, }
{disp %_slp,1,70, (%_yea%%_mon%%_day.CAP) Open Capture File > }
{gets-i cap}
{inst cap,*} {ifco capture_}
{inst cap,?} {ifco capture_}
{inst cap, } {ifco capture_}
{comp cap} {ifco-c def_cap}
{:get_capm}
{disp %_slp,50,70,CapMode [F,r,s] > }
{gets-i capm,1}
{comp capm} {ifco-c capm_f}
{comp capm,f} {ifco set_capm}
{comp capm,r} {ifco set_capm}
{comp capm,s} {ifco set_capm}
{goto get_capm}
{:set_capm} {capm %capm}
{setv capt,on}
{capt y,%savedir\%cap}{beep}{beep}
{call cap_esc}
{exec-n echo OPENED ■ %_dat %_tim^j>> %_cap} {retu}
{:cof} {setv capt}{capt n}{beep}
{exec-n echo CLOSED ■ %_dat %_tim^j■-■-■>> %_cap} {retu}
┌──────────────────────────────────┐
│ Commo Help and quick reference │
└──────────────────────────────────┘
{:show_keys} {setv stuft,y} {goto csmhs} ;Show Key Assignments
{:commo_doc} {ifca esc_[h} ;DOCS assigned to :hom
{setv file,%ins_dir\*.doc}{goto list_it} ;List Commo DOCS
{:esc_[h} {send ^[[H} {} ;VT102 home key
{:help_}{ifca ,hlp}{hang}{retu} ;Dual use of Alt-H, hangup or help
{:hlp} {ifex %_hom%cs-mac.hlp,csmh} ;use CS-MAC.HLP if it exists
{:help} {help 0} {retu}
{:csmhs}{goto csmhs,cs-mac.csm} ;guts are in CS-MAC.CSM
{:csmh} {goto csmh,cs-mac.csm} ;provides option to use COMMO help
┌───────────────────┐
│ Session History │
└───────────────────┘
{:review_log}
{setv file,%_uselog} {call list_it} ;Review Call Log
{setv file,%l_use} {goto list_it} ; & NULmodem Log
┌─────────────────┐
│ DOS Utilities │
└─────────────────┘
{:dir_free} {exec-n cd %dldir}
{exec-s %utildir%\dfr.com} {retu} ;Directory Freedom
{:reader}{ifex %reader,,do_ap}
{exec-s %reader} {goto do_ap};Mail reader
┌────────────────────┐
│ Terminal Control │
└────────────────────┘
{:video_}{comp vid} {ifco v_m1} ;Toggle video mode
{vide-m0}{setv vid} {retu}
{:v_m1} {vide-m1}{setv vid,1} {retu}
{:init} {init} {retu}
{:toggle_} {ifca elap} {togg} {}
{:elap} {info-d5s0 %_ela %ela %_nam} {}
{:doorway_}{door-m0} {}
┌───────────────────────────────────────────────────┐
│ Shell to DOS ... return to Commo home directory │
└───────────────────────────────────────────────────┘
{:shel} {shel-s} ;Shell To DOS
{subs dr,1,2,%_hom} ;Now, return to Commo
{leng %_hom} {setv len,%_len} {decr len,3} ; home directory
{subs hom,3,%len,%_hom}
{exec-n %dr} {exec-n cd %hom}
{setv dr} {setv hom} {retu}
┌───────────────────────────────────┐
│ Variable Peek and Poke commands │
└───────────────────────────────────┘
{:var_peek}{setv var} {inpu var,See What Variable?}
{comp var} {ifco retu}
{setv-s value,%var}
{inpu %%var,Variable %var,%value} ;See a Commo variable
{setv var} {setv value} {retu} ;set it from here too
┌────────────────────────────────────┐
│ Make backups of your macro files │
└────────────────────────────────────┘
{:back_up}
{exec-s %pk_zip -a %savedir\mac %_hom%*.mac %_hom%*.csm} ;Backup Macros
{exec-s %pk_zip -a %savedir\mac %_hom%*.fon %_hom%*.adr} ;Backup FONs
{comp %bu_dr} {ifco retu} ;skip copy to floppy
{exec-n copy %savedir\mac.* %bu_dr}
{comp chuck,y} {ifco ,retu} ;if %chuck=y, backup
exec-s %pk_zip -a %dldir\estate %dldir\estate %dldir\706 ; personal
exec-n copy %dldir\estate.z?p %bu_dr ; business
{exec-s %pk_zip -a %savedir\$$ g:\q5\home.*}
{exec-n copy %savedir\$$.z?p %bu_dr}
{exec-n copy %_hom%reg\??-regd %bu_dr}
{exec-n copy %_hom%reg\??-keys %bu_dr}
{exec-n copy %dldir\letters %bu_dr}
{goto do_ap}
┌────────────────┐
│ Send Strings │
└────────────────┘
{:alias} {send ~~%alias|} {retu}
{:ali_m} {setv _menu1, 1 %alias} {retu}
{:help_nam}
{inst _ela,:}{setv pos,%_pos}{decr pos}
{subs ela,1,%pos,%_ela}
{comp ela,0}{ifco-g hlp}
{comp alias} {ifco ,alias}
{send ~~%name|}{retu} ;Send Name
{:strings}
{setv _menu1, 1 %name}
{comp alias} {ifco-c ,ali_m}
{setv _menu2, 2 Password}
{setv _menu3, 3 First| Last|}
{setv _menu4, 4 %handle}
{setv _menu5, 5 %v_ph}
{setv _menu6, 6 %d_ph}
{setv _menu7, 7 %b_day}
{setv _menu9, S Signature}
{setv _menu10, T Tagline}
{setv _menu11, R Recall Cmd}
{setv _menter,pas}
{setv _mlabel,nam,pas,fal,han,vph,dph,bda,,,,,,,,,,,recall_cmd,sig,send_tag}
{subs _mcolor,25,5,%palette}
{menu 15,12,Send ...}
{retu}
{:nam} {comp alias} {ifco ,alias} ;Substitute alias if it exists
{send %name|} {retu} ;Send Name
{:han} {send %handle|} {retu} ;Send Handle
{:fal} {call f&l,cs-logon.csm} {retu} ;Send First| Last|
{:pas} {send %_pas|} {retu} ;Send Password
{:vph} {send %v_ph|} {retu} ;Send Voice Phone No.
{:dph} {send %d_ph|} {retu} ;Send Data Phone No.
{:bda} {send %b_day} {retu} ;Send Data Phone No.
{:sig} ;Send Signature
{send %sig%|~|~SN|}{}
{:init_}{ifca ,init}
{scre n,%_hom%quote.in} ;Capture/Quote Message
{scro} {edit %_hom%quote.in}
{ifex %_hom%quote.in,,equote}
{rope %_hom%quote.in,equote}
{:nline}{read line} {send ~-> %line%|}
{goto nline}
{:equote}{send ~|} {exec-n del %_hom%quote.in} {retu}
┌────────────────────────────────────────────────────────┐
│ An automatic ASCII message entry system for PCBoards │
└────────────────────────────────────────────────────────┘
{:pcb_asci}
{setv file,%dldir%\} {inpu file,Name of Upload Message}
{ifex %file%,,n_e}
{parm ,,,,2} {send e|} {asci %file%,}
{parm ,,,,0} {send ~~|~~~sn|}
{look %bbs_pmt}
{wind-k}
{setv _menu1,Delete %file (Y/n)?}
{setv _mlabel,dm_l}
{subs _mcolor,31,5,%palette}
{keys 61} {leng %file} {setv len,%_len} {incr len,20}
{menu 3,%len,CS-MAC%ver} {setv len}
{:dm_l} {setl 8,y_d}
{golo n_e,n}
{golo y_d,y}
{golo y_d,^m}
{look Delete %file%?}
{:y_d} {exec-n del %file}
{:n_e} {wind} {retu}
┌────────────────────────────────────────┐
│ Send a Tagline from your Mail Reader │
└────────────────────────────────────────┘
{:send_tag}
{comp random_t} ;If # of lines variable is NUL
{ifco select_t} ;goto select specific tagline
{setv sec,%_min} ;how many seconds since the hour started?
{mult sec,60}
{incr sec,%_sec} ;maximum 3600 lines
{divi sec,%random_t} ;divide a number from 0 to 3599
; by #lines in tagfile.
{setv rem,%_rem} ;the remainder is a
{incr rem} ; pseudo random # from 1 to %random_t
{rope %tagfile,s_tag}
{setv count,1}
{:t_loop}
{read line} ;read a tagline
{comp count,%rem} ;compare current line# with random#
{ifco-E s_tag} ;if same, send_tagline
{incr count} ;otherwise read next tagline
{goto t_loop}
{:s_tag}
{send %tag_pf %line} ;send the tagline
{rclo} ;clean up open files
{setv sec} {setv rem} ;and variables
{retu} ;END random tagline selection
{:select_t} ;START specific tagline selection
{rclo} ;make sure tagfile is closed
{setv cn} ;reset the tagline number seletion
{sete-p0 send_tag} ;make <ESC> empty a "wrong" choice
{inpu cn,Choose Tagline Nº}
{comp cn} {ifco retu} ;if no tag number, end the routine
{rope %tagfile,send_tag};open tagline file
{setv count,0} ;initialize counter
{:t_lp}
{incr count} ;increment counter
{read line} ;read a tagline
{comp cn,%count} ;is this the chosen one?
{ifco ,t_lp} ;if not, loop back
{:p_tag}
{inpu line,Press Enter to Send} ;or <ESC> to skip & reselect
{send %line^m} ;send selected tagline
{setv line} {setv cn} ;reset variables
{retu} ;END of sending specific tagline
┌──────────────────────────────────────────────┐
│ A guarded Alt-X command when leaving Commo │
└──────────────────────────────────────────────┘
{:exit_}{comp xtime} {ifco q_ask};xtim=NUL no timer, always ask
{comp xtime,0} {ifco q_q};xtim=0 no menu, quit wo/asking
{setv count,%xtime} ;guard delay
{wind-k} ;holds the menu screen in view
{:xlop} {setv _menu1, Exit ^(Commo^) in %count seconds}
{setv _menu2, "Y" to confirm}
{setv _menu4, "N" or SPACEBAR to deny}
{setv _mlabel,x__2} ;label to goto when 'A' is pressed
{subs _mcolor,31,5,%palette}
{keys 61} ;press 'A' in advance
{menu 8,33,CS-MAC%ver} ;show the menu ....
{:x__2} {setl 1,x__3} ;a one second wait
{golo q_t,y} ;'Y' branch
{golo noex,n} ;'N' branch
{golo noex, } ;SPACEbar branch
{look ^(Commo^) EXIT in %count seconds}
{goto noex} ;[ESC] response here
{:x__3} {decr count}
{comp count,0} ;when counter reaches zero
{ifco q_t,xlop} ; goto q_t, else loop
{:noex} {wind} {retu} ;remove menu screens & stay
{:q_t} {info-d1s0 Normal Exit from Commo} ;normal exit
{:q_q} {exit}
{:q_ask}{info-q Are you sure you want to exit?}
{ifco q_t,stop}
┌─────────────────────────────────────────────────────┐
│ Alternate dialing directories for internet access │
└─────────────────────────────────────────────────────┘
{:inet_dir}
{ifex %_hom%cs-acton.csm,,no_csinet}
{goto start_in,cs-acton.csm}
{:no_csinet} {info-d15 You need CS-ACTON.CSM to operate this macro}{}
{:mx} {goto alm_o} ;this label in AUX macro to run from Alt-M,X
;also in this macro to define edit "jump-to"
┌────────────────────────────────────┐
│ Test labels for Autopilot events │
└────────────────────────────────────┘
{:ev_test} ;test point for %ev_file items
{info-d5 Event Test1 ... Success}
{disp ,,,Event at %_24h%:%_min on %_dat ^j^m}
{goto fon_dial} ;all events should point to dialer
{:cdefh}{info-d5 Indirect labeling Event Test}
{goto fon_dial}
┌───────────────────────────────────────────────────────────────┐
│ Special link to Jim Bennett's Demodulator to get Commo Beta │
└───────────────────────────────────────────────────────────────┘
{:dem} {setl 30,retu,10,|}
{look <ENTER>} {send ~~~|}
{look (y/N)?} {send ~~~|}
{look name} {send ~~~beta test|}
{look password}{send ~~~guest|}
{look ^xB00} {rzmo-r %dldir} {}
┌────────────────────────────────────────────────────────┐
│ .FON -> CS-COMMO.CSM -> CS-TABLE.CSM -> CS-LOGON.CSM │
└────────────────────────────────────────────────────────┘
{:glr} {:qwk} {comp record,y} {setv record} {ifco learn}
{goto qwk,cs-table.csm} ;fetch BBS particulars
{:i_qwk} {goto i_qwk,cs-logon.csm}
┌──────────────────────────────────────────────┐
│ User defined menu for registered Autopilot │
└──────────────────────────────────────────────┘
! All editing in CS-COMMO.CSM is below this line
{:_menu}
! {setv _menu1, This space is reserved }
! {setv _menu4, %_tim:%_sec }
! {setv _menu7, for Registered Autopilot}
! {setv _menu8, Custom Hotkey Menu }
! {setv _msize,12,38} {retu}
┌─────────────────────────────────────────────────┐
│ Function key and Autopilot hotkey Assignments │
└─────────────────────────────────────────────────┘
!{:pgu} {goto u_prot} ;Upload protocol menu
!{:pgd} {goto d_prot} ;Download protocol menu
!{:hom} {goto commo_doc};LIST Commo docs
!{:nf1} {goto help_nam};send name in first minute, get help after
!{:nf2} {goto strings} ;menu of strings; name, password, phone, etc
!{:nf3} {goto capture_};capture toggle
!{:nf4} {:ap_s} {goto shel} ;with swap
!{:nf5} F2,R {goto recall_cmd};command recall routine
!{:nf6} {:ap_v} {:dialer} {goto dialer,cs-mac.csm} ;voice call phone dialer
!{:nf7} {goto searcher};search any file for matching line
!{:nf8} {goto pcb_asci};PCBoard ASCII message sender
!{:nf9} @ML {goto ul_mngr} ;Upload manager
!{:nf0} @MMH {goto strew_} ;hold directory strewing
!{:nfa} {goto start} ;re-read cs-macxx.cfg file
!{:nfb} {goto inet_dir};menu for *.ADR internet address books
!{:sf4} {:send_rep} {goto send_rep,cs-mac.csm};find and send .REP and .PST files
!{:af1} {goto dir_free};Run the DOS Program, Directory Freedom
!{:al<} {goto var_peek};peek and poke Commo variables
!{:al=} {goto doorway_};Toggle Doorway mode
!{:ald} {:ap_d} {goto fon_mark};Open .FON directory for mark and dial
!{:alh} {:ap_h} {goto help_} ;Commo and CS-MAC help / ONline Hangup
! @MK {goto show_keys};Show keyboard assignment summary
!{:alo} {goto init_} ;Initialize modem / ONline message quoter
!{:alm} {:ap_m} {goto macro_menu} ;macro menu
!{:aln} {:fon_dial} {goto fon_dial,cs-mac.csm} ;Multi-number BBS dialer
!{:alq} {:ap_q} {:edit_menu} {goto edit_menu,cs-mac.csm};edit menu
!{:alr} {:ap_u} {goto review_log} ;review call and local log files
!{:alt} {goto toggle_} ;Toggle settings / ONline elapsed time
!{:alu} {goto load_commo} ;load COMMO.MAC (%fb_mac) as auxiliary macro
!{:alv} {goto video_} ;toggle video mode
!{:alx} {:ap_x} {goto exit_} ;exit Commo
! {:ap_b} {goto u_nulmodem} ;NULmodem upload menu
! {goto d_nulmodem} ;NULmodem download menu
! {:ap_f} {:action_make} {goto act_alf,cs-acton.csm}
! @MA {goto start_ap} ;Make Autopilot start NOW
! @MMB {goto back_up} ;ZIP and floppy *.csm & *.fon files
! @MMC {goto compile_} ;Macro compile and rename
! @MOS {goto srch_addr} ;Search address book
! @MMF {:fgrep_ut} {goto fgrep_ut,cs-mac.csm} ;fgrep to do searches
! @MMX {:add_eprot} {goto add_eprot,cs-mac.csm} ;add ext protocol
! @QR {goto reader} ;run mailreader
! {:ed_rlog} {goto ed_rlog,cs-pilot.csm} ;edit RING.LOG
! @MOR {:learn} {comp jb_learn,y} {ifco jb_learn}
{goto cs-learn,cs-pilot.csm};Macro recording
{:jb_learn} {goto jb-learn,jb-learn.mac}
┌──────────────────────────┐
│ Mark and Dial routines │
└──────────────────────────┘
!{:sf1} {unma} {setv skip}
! {mark nlbbs,ledge},weather {goto fon_dial}
!{:sf2} {unma} {setv skip}
! {setv day,%_day}{divi day,2}{comp _rem,0}{ifco-e ,001}
! {mark lisaii,direct,smtc,blink} ,after5,wolf's ;biweekly
!{:001} {mark forum!,demodule,betacon,mbbsfox} ;once/week
! {mark ledge,dataw,execpc,hawkhill,execpc,nlbbs} ;once/week
! {setv m_call,fon_dial} {goto fon_dial}
!{:sf3} {unma} {mark Demodulator-BETA} {goto fon_dial}
!{:wtr} {goto wtr,weather.mac}
┌───────────────────────────────────────────┐
│ Autostart file transfer protocol labels │ Autostart string
└───────────────────────────────────────────┘ ----------------
{:phbr} {setv _prot,h} {goto dm_#} HS/Link ^bS
{:pkbr} {setv _prot,k} {goto dm_#} Kermit ^a# N3
{:psbr} {setv _prot,s} {goto dm_#} Smodem ^xSMODEM^x
{:pzbr} {setv _prot,z} {goto dm_#} Zmodem ^xB00
{:phbs} {setv _prot,h} {goto um_#} HS/Link ^bQ
{:pkbs} {setv _prot,k} {goto um_#} Kermit ^a5 S~
{:psbs} {setv _prot,s} {goto um_#} Smodem ^xSMODEM^y
{:pzbs} {setv _prot,z} {goto um_#} Zmodem ^xB01
┌─────────────────────────────────┐
│ External protocol definitions │
└─────────────────────────────────┘
* To enable an external protocol, set %eprot_[protocol letter] to
* the protocol name (%eprot_z,Zmodem). The protocol menu will call
* the command lines listed here. Additional protocols may be added
* from the OFFline utility menu (Alt-M,M,X).
!{:eup_h} {setv cmd,%protodir\hslink.exe -@ -I2 -NV -P%_por% @%_hom%^(send^).lst} {retu}
!{:edn_h} {setv cmd,%protodir\hslink.exe -@ -C -I2 -NV -P%_por% -R -O -K -U%dl_dir} {retu}
!{:eup_k} {setv cmd,%protodir\kermit.exe set bell off, set file type binary, log transaction %_uselog, set port com%_por, send %file} {retu}
!{:edn_k} {setv cmd,%protodir\kermit.exe set bell off, set file type binary, log transaction %_uselog, set port com%_por, cd %dl_dir, receive} {retu}
!{:eup_s} {setv cmd,%protodir\smodem.exe /C /+ /e:0 /E:0 /a:%_pad /i:%_irq /g /z:%_uselog /d %dl_dir /u %uldir @%_hom%^(send^).lst} {retu}
!{:edn_s} {setv cmd,%protodir\smodem.exe /C /+ /e:0 /E:0 /a:%_pad /i:%_irq /g /z:%_uselog /d %dl_dir /u %uldir} {retu}